package ch.bfh.abcmmh.testsuite.testclasses;

import junit.framework.Assert;

import org.junit.Test;

import ch.bfh.abcmmh.model.cars.specialVehicles.Car;
import ch.bfh.abcmmh.model.streetutils.Street;

public class VehicleTester {

	@Test
	public void maxSpeed() {

		Street street = new Street(20000);
		Car car1 = new Car(street, 0, 0, 1,0);
		for (int i = 0; i < 20; i++) {
			car1.accelerate();
		}
	}

	@Test
	public void minSpeed() {
		Street street = new Street(20000);
		Car car2 = new Car(street, 0, 0, 1,0);
		car2.accelerate();
		car2.accelerate();
		car2.accelerate();
		Assert.assertEquals(30, car2.getSpeedinKM());
		car2.slowdown(30);
		Assert.assertEquals(0, car2.getSpeedinKM());
		car2.slowdown(30);
		Assert.assertEquals(0, car2.getSpeedinKM());
		car2.dawdle();
		Assert.assertEquals(0, car2.getSpeedinKM());
	}

	

}
